
module.exports = {
    configureWebpack: {
        // other webpack options to merge in ...
    },
    // devServer Options don't belong into `configureWebpack`
    devServer: {
        proxy: {
            //代理名称
            '/course-api': {     //这里最好有一个 /
                target: 'http://localhost:3000',  // 后台接口域名
                changeOrigin: true,  //是否跨域
                //路径重写
                pathRewrite: {
                    '^/course-api': ''
                }
            },
        },
        // public: '192.168.0.246:8080',
        hot: true,
        disableHostCheck: true,
        public: require("os").networkInterfaces()[Object.keys(require("os").networkInterfaces())[0]][1].address + ":8080"
    }
};


